#!/usr/bin/env bash
base_path=~/docker/ELK/kibana/
container_name=elk-kibana
port=5601
script_pwd=$(dirname "$0")

rm -rf $base_path/config/*
mkdir -p $base_path/logs
cp -r $script_pwd/config $base_path/.

docker rm -f $container_name

docker run -itd \
--name $container_name \
-e TZ=Asia/Shanghai \
-p $port:5601 \
-v $base_path/config/kibana.yml:/usr/share/kibana/config/kibana.yml \
-v $base_path/config/elasticsearch-ca.pem:/usr/share/kibana/config/elasticsearch-ca.pem \
-v $base_path/logs:/usr/share/kibana/logs \
docker.elastic.co/kibana/kibana:8.16.1
